package com.woniuxy.oldmanapi.mapper;

import com.woniuxy.oldmanapi.cvo.WarehouseDetailVo;
import com.woniuxy.oldmanapi.entity.WarehouseDetail;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.Date;
import java.util.List;

@Repository
public interface WarehouseDetailMapper extends Mapper<WarehouseDetail> {
    List<WarehouseDetailVo> selectByWarehouseId(int id);

    void insertBeach(@Param("warehouseId") Integer warehouseId, @Param("createtime") Date date,@Param("list") List<WarehouseDetailVo> warehouseDetailVos);

    @Delete("delete from warehouse_detail where warehouse_id=#{warehouseId}")
    void deleteByWarehouseId(Integer warehouseId);
}
